import Vue from 'vue'
import Router from 'vue-router'
Vue.use(Router)

//异步路由
const contact = r => require.ensure([], () => r(require('../views/contact/contact')), 'contact')
const test = r => require.ensure([], () => r(require('../views/test')), 'test')
export default new Router({
  routes: [
    {
      path: '/',
      component: contact
    },
    {
      path: '/contact',
      component: contact
    },
    {
      path: '/test',
      component: test
    }
  ]
})